package com.qhy.springcloud.service;

import com.qhy.springcloud.api.Dept;
import com.qhy.springcloud.dao.DeptMapper;
import com.qhy.springcloud.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author qiuhongyu
 * @date 2020/9/25 17:24
 */
@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptMapper deptMapper;

    public void addDept(Dept dept) {
        deptMapper.addDept(dept);

    }

    public Dept queryDept(Long id) {
        return deptMapper.queryDept(id);
    }

    public List<Dept> queryDepts() {
        return deptMapper.queryDepts();
    }
}
